package com.crazypos.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.crazypos.pojo.RoleEntity;
import com.crazypos.pojo.vo.RoleAndPermissionVO;
import com.crazypos.pojo.vo.RoleDetailVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface RoleDao extends BaseMapper<RoleEntity> {

    IPage<RoleAndPermissionVO> selectRoleWithPermissions(IPage<?> page,
                                                         @Param("organizationId") String organizationId,
                                                         @Param("searchKey") String searchKey);

    RoleDetailVO selectRoleDetail(@Param("organizationId") String organizationId,
                                  @Param("roleId") String roleId);
}
